<script>
  const xhr = new XMLHttpRequest()
  xhr.open('GET', 'https://jsonplaceholder.typicode.com/users')
  xhr.onload = () => {
    if (xhr.status >= 200 && xhr.status < 300) {
      const data = JSON.parse(xhr.responseText)
      console.log(data)
    } else {
      console.error('Request failed with status:', xhr.status)
    }
  }
  xhr.onerror = () => {
    console.error('Network error')
  }
  xhr.send()
</script>
